3.1.17 \(\int \frac {(d+e x)^2 (a+b \log (c x^n))}{x^5} \, dx\) [17]

Optimal. Leaf size=95 \[ -\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{4 x^4}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2} \]

[Out]

-1/16*b*d^2*n/x^4-2/9*b*d*e*n/x^3-1/4*b*e^2*n/x^2-1/4*d^2*(a+b*ln(c*x^n))/x^4-2/3*d*e*(a+b*ln(c*x^n))/x^3-1/2*
e^2*(a+b*ln(c*x^n))/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {45, 2372, 12, 14} \begin {gather*} -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{4 x^4}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-1/16*(b*d^2*n)/x^4 - (2*b*d*e*n)/(9*x^3) - (b*e^2*n)/(4*x^2) - (d^2*(a + b*Log[c*x^n]))/(4*x^4) - (2*d*e*(a +
 b*Log[c*x^n]))/(3*x^3) - (e^2*(a + b*Log[c*x^n]))/(2*x^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^5} \, dx &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {-3 d^2-8 d e x-6 e^2 x^2}{12 x^5} \, dx\\ &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int \frac {-3 d^2-8 d e x-6 e^2 x^2}{x^5} \, dx\\ &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int \left (-\frac {3 d^2}{x^5}-\frac {8 d e}{x^4}-\frac {6 e^2}{x^3}\right ) \, dx\\ &=-\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2}-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 80, normalized size = 0.84 \begin {gather*} -\frac {12 a \left (3 d^2+8 d e x+6 e^2 x^2\right )+b n \left (9 d^2+32 d e x+36 e^2 x^2\right )+12 b \left (3 d^2+8 d e x+6 e^2 x^2\right ) \log \left (c x^n\right )}{144 x^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-1/144*(12*a*(3*d^2 + 8*d*e*x + 6*e^2*x^2) + b*n*(9*d^2 + 32*d*e*x + 36*e^2*x^2) + 12*b*(3*d^2 + 8*d*e*x + 6*e
^2*x^2)*Log[c*x^n])/x^4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.12, size = 403, normalized size = 4.24

method result size
risch \(-\frac {b \left (6 e^{2} x^{2}+8 d e x +3 d^{2}\right ) \ln \left (x^{n}\right )}{12 x^{4}}-\frac {18 i \pi b \,d^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+48 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+72 \ln \left (c \right ) b \,e^{2} x^{2}+36 b \,e^{2} n \,x^{2}+72 a \,e^{2} x^{2}+36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+96 \ln \left (c \right ) b d e x +32 b d e n x +96 a d e x -48 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+48 i \pi b d e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-48 i \pi b d e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+36 d^{2} b \ln \left (c \right )+9 b \,d^{2} n +36 a \,d^{2}}{144 x^{4}}\) \(403\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))/x^5,x,method=_RETURNVERBOSE)

[Out]

-1/12*b*(6*e^2*x^2+8*d*e*x+3*d^2)/x^4*ln(x^n)-1/144*(18*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2+36*I*Pi*b*e^2*x
^2*csgn(I*x^n)*csgn(I*c*x^n)^2+48*I*Pi*b*d*e*x*csgn(I*c)*csgn(I*c*x^n)^2-18*I*Pi*b*d^2*csgn(I*c)*csgn(I*x^n)*c
sgn(I*c*x^n)+72*ln(c)*b*e^2*x^2+36*b*e^2*n*x^2+72*a*e^2*x^2+36*I*Pi*b*e^2*x^2*csgn(I*c)*csgn(I*c*x^n)^2-36*I*P
i*b*e^2*x^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-18*I*Pi*b*d^2*csgn(I*c*x^n)^3-36*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^
3+96*ln(c)*b*d*e*x+32*b*d*e*n*x+96*a*d*e*x-48*I*Pi*b*d*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+48*I*Pi*b*d*e*x
*csgn(I*x^n)*csgn(I*c*x^n)^2-48*I*Pi*b*d*e*x*csgn(I*c*x^n)^3+18*I*Pi*b*d^2*csgn(I*c)*csgn(I*c*x^n)^2+36*d^2*b*
ln(c)+9*b*d^2*n+36*a*d^2)/x^4

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 100, normalized size = 1.05 \begin {gather*} -\frac {b n e^{2}}{4 \, x^{2}} - \frac {2 \, b d n e}{9 \, x^{3}} - \frac {b e^{2} \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {2 \, b d e \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {b d^{2} n}{16 \, x^{4}} - \frac {a e^{2}}{2 \, x^{2}} - \frac {2 \, a d e}{3 \, x^{3}} - \frac {b d^{2} \log \left (c x^{n}\right )}{4 \, x^{4}} - \frac {a d^{2}}{4 \, x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="maxima")

[Out]

-1/4*b*n*e^2/x^2 - 2/9*b*d*n*e/x^3 - 1/2*b*e^2*log(c*x^n)/x^2 - 2/3*b*d*e*log(c*x^n)/x^3 - 1/16*b*d^2*n/x^4 -
1/2*a*e^2/x^2 - 2/3*a*d*e/x^3 - 1/4*b*d^2*log(c*x^n)/x^4 - 1/4*a*d^2/x^4

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 102, normalized size = 1.07 \begin {gather*} -\frac {9 \, b d^{2} n + 36 \, {\left (b n + 2 \, a\right )} x^{2} e^{2} + 36 \, a d^{2} + 32 \, {\left (b d n + 3 \, a d\right )} x e + 12 \, {\left (6 \, b x^{2} e^{2} + 8 \, b d x e + 3 \, b d^{2}\right )} \log \left (c\right ) + 12 \, {\left (6 \, b n x^{2} e^{2} + 8 \, b d n x e + 3 \, b d^{2} n\right )} \log \left (x\right )}{144 \, x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="fricas")

[Out]

-1/144*(9*b*d^2*n + 36*(b*n + 2*a)*x^2*e^2 + 36*a*d^2 + 32*(b*d*n + 3*a*d)*x*e + 12*(6*b*x^2*e^2 + 8*b*d*x*e +
 3*b*d^2)*log(c) + 12*(6*b*n*x^2*e^2 + 8*b*d*n*x*e + 3*b*d^2*n)*log(x))/x^4

________________________________________________________________________________________

Sympy [A]
time = 0.52, size = 122, normalized size = 1.28 \begin {gather*} - \frac {a d^{2}}{4 x^{4}} - \frac {2 a d e}{3 x^{3}} - \frac {a e^{2}}{2 x^{2}} - \frac {b d^{2} n}{16 x^{4}} - \frac {b d^{2} \log {\left (c x^{n} \right )}}{4 x^{4}} - \frac {2 b d e n}{9 x^{3}} - \frac {2 b d e \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {b e^{2} n}{4 x^{2}} - \frac {b e^{2} \log {\left (c x^{n} \right )}}{2 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))/x**5,x)

[Out]

-a*d**2/(4*x**4) - 2*a*d*e/(3*x**3) - a*e**2/(2*x**2) - b*d**2*n/(16*x**4) - b*d**2*log(c*x**n)/(4*x**4) - 2*b
*d*e*n/(9*x**3) - 2*b*d*e*log(c*x**n)/(3*x**3) - b*e**2*n/(4*x**2) - b*e**2*log(c*x**n)/(2*x**2)

________________________________________________________________________________________

Giac [A]
time = 2.13, size = 108, normalized size = 1.14 \begin {gather*} -\frac {72 \, b n x^{2} e^{2} \log \left (x\right ) + 96 \, b d n x e \log \left (x\right ) + 36 \, b n x^{2} e^{2} + 32 \, b d n x e + 72 \, b x^{2} e^{2} \log \left (c\right ) + 96 \, b d x e \log \left (c\right ) + 36 \, b d^{2} n \log \left (x\right ) + 9 \, b d^{2} n + 72 \, a x^{2} e^{2} + 96 \, a d x e + 36 \, b d^{2} \log \left (c\right ) + 36 \, a d^{2}}{144 \, x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="giac")

[Out]

-1/144*(72*b*n*x^2*e^2*log(x) + 96*b*d*n*x*e*log(x) + 36*b*n*x^2*e^2 + 32*b*d*n*x*e + 72*b*x^2*e^2*log(c) + 96
*b*d*x*e*log(c) + 36*b*d^2*n*log(x) + 9*b*d^2*n + 72*a*x^2*e^2 + 96*a*d*x*e + 36*b*d^2*log(c) + 36*a*d^2)/x^4

________________________________________________________________________________________

Mupad [B]
time = 3.73, size = 85, normalized size = 0.89 \begin {gather*} -\frac {x^2\,\left (6\,a\,e^2+3\,b\,e^2\,n\right )+3\,a\,d^2+x\,\left (8\,a\,d\,e+\frac {8\,b\,d\,e\,n}{3}\right )+\frac {3\,b\,d^2\,n}{4}}{12\,x^4}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d^2}{4}+\frac {2\,b\,d\,e\,x}{3}+\frac {b\,e^2\,x^2}{2}\right )}{x^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))*(d + e*x)^2)/x^5,x)

[Out]

- (x^2*(6*a*e^2 + 3*b*e^2*n) + 3*a*d^2 + x*(8*a*d*e + (8*b*d*e*n)/3) + (3*b*d^2*n)/4)/(12*x^4) - (log(c*x^n)*(
(b*d^2)/4 + (b*e^2*x^2)/2 + (2*b*d*e*x)/3))/x^4

________________________________________________________________________________________